﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetAllCutsAndAlbumsSorted.aspx.cs" Inherits="GetAllCutsAndAlbumsSorted" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2>List All Cuts and Albums (Sorted) - Revised</h2>
        <p>This listing of all the cuts and albums (sorted by Title) uses a nested Repeater bound to an ObjectDataSource control.</p>
        <asp:Repeater id="uxAllAlbumsRepeater" runat="server" 
            DataSourceID="CutsAndAlbumsDataSource">
            <ItemTemplate>
                <h2><%# DataBinder.Eval(Container.DataItem, "Title") %></h2>
                <asp:Repeater
                     ID="uxAllCutsRepeater"
                     runat="server"
                     EnableViewState="false"
                     DataSource='<%# DataBinder.Eval(Container.DataItem, "Cuts") %>'>
                    <HeaderTemplate><ul></HeaderTemplate>
                    <ItemTemplate>
                        <li><%# DataBinder.Eval(Container.DataItem, "Title") %></li>
                    </ItemTemplate>
                    <FooterTemplate></ul></FooterTemplate>
                 </asp:Repeater>
            </ItemTemplate>
        </asp:Repeater>
        <asp:ObjectDataSource ID="CutsAndAlbumsDataSource" runat="server" 
            OldValuesParameterFormatString="original_{0}" 
            SelectMethod="GetAllCutsAndAlbums" 
            TypeName="MusicLine.MusicLineController" 
            onobjectcreating="CutsAndAlbumsDataSource_ObjectCreating">
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
